package dao;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

import modelo.CriterioAceitacao;

import controle.CondicaoTesteControle;
import controle.FluidoControle;

public class ConfirmacaoPedidoDao {
	
	private Connection conexao;
		
	public ConfirmacaoPedidoDao(Connection con) throws ClassNotFoundException {
		this.conexao = con;		
	}
	
	public String getObservacaoCp(int codigo) {		
		String str = null;		
		PreparedStatement stm = null;
		try {
			stm = conexao.prepareStatement("select dsObservacao_cp from observacao_cp " +  
										   "where cdObservacao_cp = ?");
			stm.setInt(1, codigo);			
			ResultSet rs = stm.executeQuery();
			while (rs.next()) {
				str = rs.getString("dsObservacao_cp");
			}						
		} catch (SQLException sqlEx) {
			sqlEx.printStackTrace();
		}
		return str;		
	}

}
